package com.sxx.beautifulcity.activity;

import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.webkit.WebView;
import android.widget.ImageView;
import android.widget.TextView;

import com.sxx.beautifulcity.R;

/**
 * Created by dllo on 15/11/9.
 */
public class StoreDetailIntentActivity extends AppCompatActivity implements View.OnClickListener {
    private WebView store_detail_webview;
    private String url;
    private TextView titleTv , moreTv;
    private ImageView backIv;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.webview_storedetial_intent);
        initView();
    }

    private void initView() {

        titleTv = (TextView) findViewById(R.id.titleTv);
        titleTv.setText("收藏");
        moreTv = (TextView) findViewById(R.id.moreTv);
        moreTv.setText("");
        backIv = (ImageView) findViewById(R.id.backIV);
        backIv.setOnClickListener(this);

        store_detail_webview = (WebView) findViewById(R.id.store_detail_webview);
        Intent intent = getIntent();
        url = intent.getStringExtra("url");
        store_detail_webview.loadUrl(url);
    }

    @Override
    public void onClick(View v) {
        Intent intent = new Intent(this , MainActivity.class);
        startActivity(intent);
        finish();
        overridePendingTransition(R.anim.left_out, R.anim.right_into);
    }
}
